<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ page import="net.seabookchen.pojo.Mood"%>
<%@ page import="net.seabookchen.pojo.MoodType"%>

<script type="text/javascript">
	$(function() {
		$("#moods-rest-result a").click(function(e) {
			var entityId = $(this).attr('href');
			e.preventDefault();
			deleteEntity('mood', entityId, '#moods-action');
		});
	})
</script>

<body>
	<h3>${action}</h3>
	<c:forEach var="entity" items="${entities}">
		<div id="moods-rest-result" class="entity-style group">
			<aside class="mood-type">
				<img src="${entity.type.renderImgUrl}" />
			</aside>
			<article class="content">
				<div class="content-moods">
					<p>
						${entity.moods}
						<c:if test="${isAdmin}">
							<a href="${entity.id}">Del</a>
						</c:if>
					</p>
				</div>
				<div class="content-time">${entity.created}</div>
			</article>
		</div>
	</c:forEach>
</body>
